package com.zzyk.main.mapper;


import com.zzyk.main.model.vo.DeviceInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface SysDeviceDao {

    @Select("SELECT * FROM tb_device WHERE `id`=#{id}")
    @ResultMap("device")
    public DeviceInfo getDeviceById(@Param("id") int id);


    @Select("SELECT * FROM tb_device WHERE `enterpise`=#{organizationId}")
    @ResultMap("device")
    public List<DeviceInfo> getDeviceByOrganizantion(@Param("organizationId") int organizationId);
}
